# CWL Tool Installation

- Before installing the cwltool, ensure that Python is installed on your system.. If Python is not installed, you can install it by following these steps:
  1. Visit the official Python website: [https://www.python.org/](https://www.python.org/).
  2. Download the latest version of Python for your operating system.
  3. Run the installer and ensure that the "Add Python to PATH" option is selected during installation.
  4. Verify the installation by checking the Python version:
     ```bash
     python --version
     ```

- Once Python is installed, install the cwltool using the following command:
  ```bash
  pip install cwltool
  ```
- To verify the installation, check the cwl version using the following command:
  ```bash
  cwltool --version
  ```
- Download and install Docker Desktop from the official Docker website using this URL: [Docker Installation](https://docs.docker.com/get-started/introduction/get-docker-desktop/).
- Log in to your Docker account using your credentials.

## Running the Workflow

### Download Required Files

- Navigate to the [Harvard Dataverse](https://dataverse.harvard.edu/dataverse/okstate_workflow) and select a case study. 
- Then, go to the 
CWL directory and download all CWL files from the directory including `Workflow.cwl` and `job.yaml`

### Running the Workflow on macOS
1. After downloading the required files, follow the above steps to install Python and cwltool.
2. Navigate to the directory where the downloaded CWL Files are located:
   ```bash
   cd path/Cwl/cwl_files
   ```
3. Start the workflow execution using the following command:
   ```bash
   cwltool workflow.cwl job.yaml
   ```
4. All workflow output files will be saved in the current directory.

### Running the Workflow on Windows
1. Install Windows Subsystem for Linux (WSL) using the following command in the command prompt (run as Administrator):
   ```bash
   wsl --install
   ```

2. Open the Command Prompt (run as Administrator) and navigate to the directory where all CWL Files related to the workflow are located.
3. Start WSL using the following command:
   ```bash
   wsl
   ```
4. Execute these commands in WSL to install cwltool and its dependencies:
   ```bash
   sudo apt-get update
   sudo apt-get install cwltool
   sudo apt-get install python3-pip python3-setuptools
   ```
5. Verify the cwltool installation using this command:
   ```bash
   cwltool --version
   ```
6. Start the workflow execution using the following command:
   ```bash
   cwltool Workflow.cwl job.yaml
   ```
7. All workflow output files will be saved in the current directory.

### Running the Workflow on Linux

1. Open the Terminal in the directory where all CWL files are located.

2. Execute these commands in the terminal to install cwltool and its dependencies:
   ```
   sudo apt-get update
   sudo apt-get install cwltool
   sudo apt-get install python3-pip python3-setuptools
   ```
3. Verify the cwltool installation using this command:
   ```
   cwltool --version
   ```
4. Start the workflow execution using the following command:
   ```
   cwltool Workflow.cwl job.yaml
   ```
5. All workflow output files will be saved in the current directory.
